package com.zhubayi.mapper;

import com.zhubayi.entity.History;
import com.zhubayi.entity.Video;
import com.zhubayi.entity.vo.HistoryVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * @author 祝八一
 */
@Mapper
@Repository
public interface HistoryMapper {
    void add(@Param("uid") Integer uid, @Param("vid") Integer vid, @Param("viewTime") Date viewTime);
    void update(@Param("uid") Integer uid, @Param("vid") Integer vid, @Param("viewTime") Date viewTime);
    void delete(@Param("uid") Integer uid, @Param("vid") Integer vid);

    List<HistoryVo>  queryByUid(@Param("uid") Integer uid);

    History queryByUidAndId(@Param("uid") Integer uid, @Param("vid") Integer vid);
}
